home *** CD-ROM | disk | FTP | other *** search
- PC Magazine's CHECK.COM - turbo-charges your batch files
- vol 6 #3
-
- CHECK is a utility that will allow you alot more flexability while running
- batch files. It is able to check for a variety of things such as files being
- present, file sizes, disk space, DOS version, etc ... and return the values
- through the ERRORLEVEL variable that is available at the DOS level.
-
- syntax : CHECK keyword [parameter 1] [parameter 2] [parameter 3] ...
-
- CHECK must be run under DOS 2.0 or later
-
- There are 16 keywords that can be used, following the keyword is what will be
- returned after being processed:
-
- KEYWORD ERRORLEVEL RETURNED
- -------------------------- ----------------------------------------
- FILESIZE filespec Length of File in K
-
- FILEFOUND filespec 0 : File Found
- 1 : File Not Found
-
- FILETEXT filespec 'string' 0 : 'string' was found in the file
- 1 : 'string' was not found
-
- DISKSPACE [d:] Number of whole 16K blocks free on
- indicated or default drive
-
- MEMORY Number of 16K RAM modules
-
- VIDEOCARD 0 : Monochrome Display Adapter
- 1 : Color Graphics Adapter
- 2 : Enhanced Graphics Adapter
-
- VIDEOMODE Current Video Mode 0 - 16
-
- MODEL Machine ID byte
-
- 8087 0 : 8087/80287 installed
- or 80287 1 : 8087/80287 not installed
-
- TIME Current Hour 0 - 23
-
- DAY Current Day 1 - 31
-
- MONTH Current Month 1 - 12
-
- VERSION Major DOS number 2 or 3
-
- KEYBOARD 0 : Keyboard buffer empty
- 1 : Character waiting in buffer
-
- KEYPRESS ASCII code of key pressed